﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FbKPI.Model;
using FbKPI.Controller;

namespace FbKPI.Facade
{
    public class DivisionFacade
    {
        public string Save(Division Divisions)
        {
            DivisionController cont = new DivisionController();
            return cont.Save(Divisions);
        }

        public string Delete(Division Divisions)
        {
            DivisionController cont = new DivisionController();
            return cont.Delete(Divisions);
        }

        public string BeforeDelete(Division Divisions)
        {
            DivisionController cont = new DivisionController();
            return cont.BeforeDelete(Divisions);
        }

        public IList<Division> GetAll(string sSearch, int PageNumber, int DataLength, string SortCol, string SortDirection, out int TotalData, int BusinessGroupID)
        {
            IList<Division> Divisions = new List<Division>();
            DivisionController cont = new DivisionController();
            Divisions = cont.GetAll(sSearch, PageNumber, DataLength, SortCol, SortDirection, out TotalData, BusinessGroupID);
            return Divisions;
        }

        public Division GetDivisionByID(int ID)
        {
            Division divisions = new Division();
            DivisionController cont = new DivisionController();
            divisions = cont.GetDivisionByID(ID);
            return divisions;
        }

        public Division GetDivisionByDescription(string Description)
        {
            Division divisions = new Division();
            DivisionController cont = new DivisionController();
            divisions = cont.GetDivisionByDescription(Description);
            return divisions;
        }
    }
}